Zero our allocated struct.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Jan 2003 14:13:26 +0000 (14:13 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Tue, 21 Jan 2003 14:13:26 +0000 (14:13 +0000)
gpsbabel/mkshort.c

index 9abf9e09cb6a3739e9a8d7f56c0d462997b6485d..64d17d91fa0b3a1ec2b38f914c7aed55528f1392 100644 (file)
@@ -65,7 +65,7 @@ mkshort_add_to_list(mkshort_handle *h, char *name)
 {
        queue *e, *t;
        int hash;
-       uniq_shortname *s = xmalloc(sizeof (uniq_shortname));
+       uniq_shortname *s = xcalloc(1, sizeof (uniq_shortname));
        s->orig_shortname = strdup(name);
        hash = hash_string(name);